.class public Lcom/ninesky/browser/AddBookmarkActivity;
.super Landroid/app/Activity;

# interfaces
.implements Landroid/view/View$OnClickListener;
.implements Lcom/ninesky/a/a/a;


# instance fields
.field private final a:Ljava/lang/String;

.field private final b:Z

.field private c:Landroid/widget/EditText;

.field private d:Landroid/widget/EditText;

.field private e:Landroid/widget/EditText;

.field private f:Landroid/widget/Button;

.field private g:Landroid/widget/Button;

.field private h:Landroid/widget/Button;

.field private i:Landroid/view/View;

.field private j:Landroid/widget/TableLayout;

.field private k:Z

.field private l:Landroid/os/Bundle;

.field private m:Ljava/lang/String;

.field private n:Ljava/lang/String;

.field private o:Ljava/lang/String;

.field private p:Ljava/lang/String;

.field private q:Ljava/lang/String;

.field private r:Ljava/util/Vector;

.field private s:[Ljava/lang/String;

.field private t:Lcom/ninesky/browser/a/a;

.field private u:I

.field private v:Z

.field private w:Z

.field private x:Landroid/os/Handler;

.field private y:Landroid/text/TextWatcher;

.field private z:Landroid/widget/CompoundButton$OnCheckedChangeListener;


# direct methods
.method public constructor <init>()V
    .locals 1

    invoke-direct {p0}, Landroid/app/Activity;-><init>()V

    const-string v0, "NSBrowser.AddBookmarkActivity"

    iput-object v0, p0, Lcom/ninesky/browser/AddBookmarkActivity;->a:Ljava/lang/String;

    const/4 v0, 0x0

    iput-boolean v0, p0, Lcom/ninesky/browser/AddBookmarkActivity;->b:Z

    const/4 v0, -0x1

    iput v0, p0, Lcom/ninesky/browser/AddBookmarkActivity;->u:I

    new-instance v0, Lcom/ninesky/browser/aq;

    invoke-direct {v0, p0}, Lcom/ninesky/browser/aq;-><init>(Lcom/ninesky/browser/AddBookmarkActivity;)V

    iput-object v0, p0, Lcom/ninesky/browser/AddBookmarkActivity;->x:Landroid/os/Handler;

    new-instance v0, Lcom/ninesky/browser/as;

    invoke-direct {v0, p0}, Lcom/ninesky/browser/as;-><init>(Lcom/ninesky/browser/AddBookmarkActivity;)V

    iput-object v0, p0, Lcom/ninesky/browser/AddBookmarkActivity;->y:Landroid/text/TextWatcher;

    new-instance v0, Lcom/ninesky/browser/m;

    invoke-direct {v0, p0}, Lcom/ninesky/browser/m;-><init>(Lcom/ninesky/browser/AddBookmarkActivity;)V

    iput-object v0, p0, Lcom/ninesky/browser/AddBookmarkActivity;->z:Landroid/widget/CompoundButton$OnCheckedChangeListener;

    new-instance v0, Ljava/util/Vector;

    invoke-direct {v0}, Ljava/util/Vector;-><init>()V

    iput-object v0, p0, Lcom/ninesky/browser/AddBookmarkActivity;->r:Ljava/util/Vector;

    return-void
.end method

.method private a(Landroid/widget/EditText;)Ljava/lang/String;
    .locals 3

    invoke-virtual {p1}, Landroid/widget/EditText;->getText()Landroid/text/Editable;

    move-result-object v0

    invoke-interface {v0}, Landroid/text/Editable;->toString()Ljava/lang/String;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/String;->trim()Ljava/lang/String;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/String;->toLowerCase()Ljava/lang/String;

    move-result-object v0

    const-string v1, "\uff0c"

    const-string v2, ","

    invoke-virtual {v0, v1, v2}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;

    move-result-object v0

    const-string v1, ","

    invoke-static {v0, v1}, Lcom/ninesky/a/b;->a(Ljava/lang/String;Ljava/lang/String;)Ljava/util/Vector;

    move-result-object v0

    iput-object v0, p0, Lcom/ninesky/browser/AddBookmarkActivity;->r:Ljava/util/Vector;

    iget-object v0, p0, Lcom/ninesky/browser/AddBookmarkActivity;->r:Ljava/util/Vector;

    const-string v1, ","

    invoke-static {v0, v1}, Lcom/ninesky/a/b;->a(Ljava/util/Vector;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    iput-object v0, p0, Lcom/ninesky/browser/AddBookmarkActivity;->q:Ljava/lang/String;

    iget-object v0, p0, Lcom/ninesky/browser/AddBookmarkActivity;->q:Ljava/lang/String;

    invoke-virtual {p1, v0}, Landroid/widget/EditText;->setText(Ljava/lang/CharSequence;)V

    iget-object v0, p0, Lcom/ninesky/browser/AddBookmarkActivity;->q:Ljava/lang/String;

    return-object v0
.end method

.method static synthetic a(Lcom/ninesky/browser/AddBookmarkActivity;Ljava/lang/String;)V
    .locals 0

    iput-object p1, p0, Lcom/ninesky/browser/AddBookmarkActivity;->q:Ljava/lang/String;

    return-void
.end method

.method static synthetic a(Lcom/ninesky/browser/AddBookmarkActivity;Ljava/util/Vector;)V
    .locals 0

    iput-object p1, p0, Lcom/ninesky/browser/AddBookmarkActivity;->r:Ljava/util/Vector;

    return-void
.end method

.method static synthetic a(Lcom/ninesky/browser/AddBookmarkActivity;[Ljava/lang/String;)V
    .locals 7

    const/4 v6, 0x1

    const/4 v2, 0x0

    if-eqz p1, :cond_1

    iget-object v0, p0, Lcom/ninesky/browser/AddBookmarkActivity;->i:Landroid/view/View;

    invoke-virtual {v0}, Landroid/view/View;->getVisibility()I

    move-result v0

    if-nez v0, :cond_0

    iget-object v0, p0, Lcom/ninesky/browser/AddBookmarkActivity;->i:Landroid/view/View;

    const/16 v1, 0x8

    invoke-virtual {v0, v1}, Landroid/view/View;->setVisibility(I)V

    :cond_0
    iget-object v0, p0, Lcom/ninesky/browser/AddBookmarkActivity;->j:Landroid/widget/TableLayout;

    invoke-virtual {v0}, Landroid/widget/TableLayout;->removeAllViews()V

    iget-object v0, p0, Lcom/ninesky/browser/AddBookmarkActivity;->j:Landroid/widget/TableLayout;

    invoke-virtual {v0, v2}, Landroid/widget/TableLayout;->setVisibility(I)V

    array-length v0, p1

    move v1, v2

    :goto_0
    if-ge v1, v0, :cond_1

    const/4 v2, 0x6

    if-lt v1, v2, :cond_2

    :cond_1
    return-void

    :cond_2
    new-instance v2, Landroid/widget/TableRow;

    invoke-direct {v2, p0}, Landroid/widget/TableRow;-><init>(Landroid/content/Context;)V

    new-instance v3, Landroid/widget/CheckBox;

    invoke-direct {v3, p0}, Landroid/widget/CheckBox;-><init>(Landroid/content/Context;)V

    aget-object v4, p1, v1

    invoke-virtual {v3, v4}, Landroid/widget/CheckBox;->setText(Ljava/lang/CharSequence;)V

    iget-object v5, p0, Lcom/ninesky/browser/AddBookmarkActivity;->z:Landroid/widget/CompoundButton$OnCheckedChangeListener;

    invoke-virtual {v3, v5}, Landroid/widget/CheckBox;->setOnCheckedChangeListener(Landroid/widget/CompoundButton$OnCheckedChangeListener;)V

    iget-object v5, p0, Lcom/ninesky/browser/AddBookmarkActivity;->r:Ljava/util/Vector;

    invoke-virtual {v5, v4}, Ljava/util/Vector;->contains(Ljava/lang/Object;)Z

    move-result v4

    if-eqz v4, :cond_3

    invoke-virtual {v3, v6}, Landroid/widget/CheckBox;->setChecked(Z)V

    :cond_3
    invoke-virtual {v2, v3}, Landroid/widget/TableRow;->addView(Landroid/view/View;)V

    add-int/lit8 v3, v1, 0x1

    if-ge v3, v0, :cond_5

    new-instance v3, Landroid/widget/CheckBox;

    invoke-direct {v3, p0}, Landroid/widget/CheckBox;-><init>(Landroid/content/Context;)V

    add-int/lit8 v4, v1, 0x1

    aget-object v4, p1, v4

    invoke-virtual {v3, v4}, Landroid/widget/CheckBox;->setText(Ljava/lang/CharSequence;)V

    iget-object v5, p0, Lcom/ninesky/browser/AddBookmarkActivity;->z:Landroid/widget/CompoundButton$OnCheckedChangeListener;

    invoke-virtual {v3, v5}, Landroid/widget/CheckBox;->setOnCheckedChangeListener(Landroid/widget/CompoundButton$OnCheckedChangeListener;)V

    iget-object v5, p0, Lcom/ninesky/browser/AddBookmarkActivity;->r:Ljava/util/Vector;

    invoke-virtual {v5, v4}, Ljava/util/Vector;->contains(Ljava/lang/Object;)Z

    move-result v4

    if-eqz v4, :cond_4

    invoke-virtual {v3, v6}, Landroid/widget/CheckBox;->setChecked(Z)V

    :cond_4
    invoke-virtual {v2, v3}, Landroid/widget/TableRow;->addView(Landroid/view/View;)V

    :cond_5
    iget-object v3, p0, Lcom/ninesky/browser/AddBookmarkActivity;->j:Landroid/widget/TableLayout;

    invoke-virtual {v3, v2}, Landroid/widget/TableLayout;->addView(Landroid/view/View;)V

    add-int/lit8 v1, v1, 0x2

    goto :goto_0
.end method

.method static synthetic a(Lcom/ninesky/browser/AddBookmarkActivity;)[Ljava/lang/String;
    .locals 1

    iget-object v0, p0, Lcom/ninesky/browser/AddBookmarkActivity;->s:[Ljava/lang/String;

    return-object v0
.end method

.method static synthetic b(Lcom/ninesky/browser/AddBookmarkActivity;)Landroid/view/View;
    .locals 1

    iget-object v0, p0, Lcom/ninesky/browser/AddBookmarkActivity;->i:Landroid/view/View;

    return-object v0
.end method

.method static synthetic b(Lcom/ninesky/browser/AddBookmarkActivity;Ljava/lang/String;)V
    .locals 0

    iput-object p1, p0, Lcom/ninesky/browser/AddBookmarkActivity;->p:Ljava/lang/String;

    return-void
.end method

.method static synthetic c(Lcom/ninesky/browser/AddBookmarkActivity;)Landroid/widget/EditText;
    .locals 1

    iget-object v0, p0, Lcom/ninesky/browser/AddBookmarkActivity;->e:Landroid/widget/EditText;

    return-object v0
.end method

.method private c()V
    .locals 3

    const-string v0, "input_method"

    invoke-virtual {p0, v0}, Lcom/ninesky/browser/AddBookmarkActivity;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Landroid/view/inputmethod/InputMethodManager;

    if-eqz v0, :cond_0

    iget-object v1, p0, Lcom/ninesky/browser/AddBookmarkActivity;->d:Landroid/widget/EditText;

    invoke-virtual {v1}, Landroid/widget/EditText;->getWindowToken()Landroid/os/IBinder;

    move-result-object v1

    const/4 v2, 0x0

    invoke-virtual {v0, v1, v2}, Landroid/view/inputmethod/InputMethodManager;->hideSoftInputFromWindow(Landroid/os/IBinder;I)Z

    :cond_0
    return-void
.end method

.method static synthetic c(Lcom/ninesky/browser/AddBookmarkActivity;Ljava/lang/String;)V
    .locals 2

    invoke-static {}, Lcom/ninesky/browser/a/a;->f()Z

    move-result v0

    if-eqz v0, :cond_1

    iget-object v0, p0, Lcom/ninesky/browser/AddBookmarkActivity;->t:Lcom/ninesky/browser/a/a;

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcom/ninesky/browser/AddBookmarkActivity;->t:Lcom/ninesky/browser/a/a;

    invoke-virtual {v0}, Lcom/ninesky/browser/a/a;->i()V

    :cond_0
    new-instance v0, Lcom/ninesky/browser/a/a;

    invoke-direct {v0, p0}, Lcom/ninesky/browser/a/a;-><init>(Landroid/content/Context;)V

    iput-object v0, p0, Lcom/ninesky/browser/AddBookmarkActivity;->t:Lcom/ninesky/browser/a/a;

    iget-object v0, p0, Lcom/ninesky/browser/AddBookmarkActivity;->t:Lcom/ninesky/browser/a/a;

    invoke-virtual {v0, p0}, Lcom/ninesky/browser/a/a;->a(Lcom/ninesky/a/a/a;)V

    iget-object v0, p0, Lcom/ninesky/browser/AddBookmarkActivity;->t:Lcom/ninesky/browser/a/a;

    invoke-virtual {v0, p1}, Lcom/ninesky/browser/a/a;->a(Ljava/lang/String;)V

    iget-object v0, p0, Lcom/ninesky/browser/AddBookmarkActivity;->t:Lcom/ninesky/browser/a/a;

    invoke-virtual {v0}, Lcom/ninesky/browser/a/a;->h()V

    iget-object v0, p0, Lcom/ninesky/browser/AddBookmarkActivity;->j:Landroid/widget/TableLayout;

    const/16 v1, 0x8

    invoke-virtual {v0, v1}, Landroid/widget/TableLayout;->setVisibility(I)V

    iget-object v0, p0, Lcom/ninesky/browser/AddBookmarkActivity;->i:Landroid/view/View;

    const/4 v1, 0x0

    invoke-virtual {v0, v1}, Landroid/view/View;->setVisibility(I)V

    :cond_1
    return-void
.end method

.method static synthetic d(Lcom/ninesky/browser/AddBookmarkActivity;)Ljava/lang/String;
    .locals 1

    iget-object v0, p0, Lcom/ninesky/browser/AddBookmarkActivity;->q:Ljava/lang/String;

    return-object v0
.end method

.method private d()Z
    .locals 8

    const/4 v7, 0x1

    const/4 v6, 0x0

    iget-object v0, p0, Lcom/ninesky/browser/AddBookmarkActivity;->c:Landroid/widget/EditText;

    invoke-virtual {v0}, Landroid/widget/EditText;->getText()Landroid/text/Editable;

    move-result-object v0

    invoke-interface {v0}, Landroid/text/Editable;->toString()Ljava/lang/String;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/String;->trim()Ljava/lang/String;

    move-result-object v0

    iget-object v1, p0, Lcom/ninesky/browser/AddBookmarkActivity;->d:Landroid/widget/EditText;

    invoke-virtual {v1}, Landroid/widget/EditText;->getText()Landroid/text/Editable;

    move-result-object v1

    invoke-interface {v1}, Landroid/text/Editable;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-static {v1}, Lcom/ninesky/a/a;->a(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0}, Ljava/lang/String;->length()I

    move-result v2

    if-nez v2, :cond_3

    move v2, v7

    :goto_0
    invoke-virtual {v1}, Ljava/lang/String;->trim()Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v3}, Ljava/lang/String;->length()I

    move-result v3

    if-nez v3, :cond_4

    move v3, v7

    :goto_1
    invoke-virtual {p0}, Lcom/ninesky/browser/AddBookmarkActivity;->getResources()Landroid/content/res/Resources;

    move-result-object v4

    if-nez v2, :cond_0

    if-eqz v3, :cond_5

    :cond_0
    if-eqz v2, :cond_1

    iget-object v0, p0, Lcom/ninesky/browser/AddBookmarkActivity;->c:Landroid/widget/EditText;

    const v1, 0x7f0700af

    invoke-virtual {v4, v1}, Landroid/content/res/Resources;->getText(I)Ljava/lang/CharSequence;

    move-result-object v1

    invoke-virtual {v0, v1}, Landroid/widget/EditText;->setError(Ljava/lang/CharSequence;)V

    :cond_1
    if-eqz v3, :cond_2

    iget-object v0, p0, Lcom/ninesky/browser/AddBookmarkActivity;->d:Landroid/widget/EditText;

    const v1, 0x7f0700b0

    invoke-virtual {v4, v1}, Landroid/content/res/Resources;->getText(I)Ljava/lang/CharSequence;

    move-result-object v1

    invoke-virtual {v0, v1}, Landroid/widget/EditText;->setError(Ljava/lang/CharSequence;)V

    :cond_2
    move v0, v6

    :goto_2
    return v0

    :cond_3
    move v2, v6

    goto :goto_0

    :cond_4
    move v3, v6

    goto :goto_1

    :cond_5
    invoke-virtual {v1}, Ljava/lang/String;->trim()Ljava/lang/String;

    move-result-object v2

    :try_start_0
    invoke-virtual {v2}, Ljava/lang/String;->toLowerCase()Ljava/lang/String;

    move-result-object v3

    const-string v5, "javascript:"

    invoke-virtual {v3, v5}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z

    move-result v3

    if-nez v3, :cond_9

    new-instance v3, Ljava/net/URI;

    invoke-direct {v3, v2}, Ljava/net/URI;-><init>(Ljava/lang/String;)V

    invoke-virtual {v3}, Ljava/net/URI;->getScheme()Ljava/lang/String;

    move-result-object v3

    invoke-static {v2}, Lcom/ninesky/browser/provider/b;->a(Ljava/lang/String;)Z

    move-result v5

    if-nez v5, :cond_9

    if-eqz v3, :cond_6

    iget-object v0, p0, Lcom/ninesky/browser/AddBookmarkActivity;->d:Landroid/widget/EditText;

    const v1, 0x7f0700b3

    invoke-virtual {v4, v1}, Landroid/content/res/Resources;->getText(I)Ljava/lang/CharSequence;

    move-result-object v1

    invoke-virtual {v0, v1}, Landroid/widget/EditText;->setError(Ljava/lang/CharSequence;)V
    :try_end_0
    .catch Ljava/net/URISyntaxException; {:try_start_0 .. :try_end_0} :catch_0

    move v0, v6

    goto :goto_2

    :cond_6
    :try_start_1
    new-instance v2, Landroid/net/WebAddress;

    invoke-direct {v2, v1}, Landroid/net/WebAddress;-><init>(Ljava/lang/String;)V
    :try_end_1
    .catch Ljava/lang/Exception; {:try_start_1 .. :try_end_1} :catch_1
    .catch Ljava/net/URISyntaxException; {:try_start_1 .. :try_end_1} :catch_0

    :try_start_2
    iget-object v1, v2, Landroid/net/WebAddress;->mHost:Ljava/lang/String;

    invoke-virtual {v1}, Ljava/lang/String;->length()I

    move-result v1

    if-nez v1, :cond_7

    new-instance v0, Ljava/net/URISyntaxException;

    const-string v1, ""

    const-string v2, ""

    invoke-direct {v0, v1, v2}, Ljava/net/URISyntaxException;-><init>(Ljava/lang/String;Ljava/lang/String;)V

    throw v0
    :try_end_2
    .catch Ljava/net/URISyntaxException; {:try_start_2 .. :try_end_2} :catch_0

    :catch_0
    move-exception v0

    iget-object v0, p0, Lcom/ninesky/browser/AddBookmarkActivity;->d:Landroid/widget/EditText;

    const v1, 0x7f0700b2

    invoke-virtual {v4, v1}, Landroid/content/res/Resources;->getText(I)Ljava/lang/CharSequence;

    move-result-object v1

    invoke-virtual {v0, v1}, Landroid/widget/EditText;->setError(Ljava/lang/CharSequence;)V

    move v0, v6

    goto :goto_2

    :catch_1
    move-exception v0

    :try_start_3
    new-instance v0, Ljava/net/URISyntaxException;

    const-string v1, ""

    const-string v2, ""

    invoke-direct {v0, v1, v2}, Ljava/net/URISyntaxException;-><init>(Ljava/lang/String;Ljava/lang/String;)V

    throw v0

    :cond_7
    invoke-virtual {v2}, Landroid/net/WebAddress;->toString()Ljava/lang/String;
    :try_end_3
    .catch Ljava/net/URISyntaxException; {:try_start_3 .. :try_end_3} :catch_0

    move-result-object v1

    :goto_3
    iget-object v2, p0, Lcom/ninesky/browser/AddBookmarkActivity;->e:Landroid/widget/EditText;

    invoke-direct {p0, v2}, Lcom/ninesky/browser/AddBookmarkActivity;->a(Landroid/widget/EditText;)Ljava/lang/String;

    new-instance v2, Landroid/os/Bundle;

    invoke-direct {v2}, Landroid/os/Bundle;-><init>()V

    const-string v3, "title"

    invoke-virtual {v2, v3, v0}, Landroid/os/Bundle;->putString(Ljava/lang/String;Ljava/lang/String;)V

    const-string v0, "url"

    invoke-virtual {v2, v0, v1}, Landroid/os/Bundle;->putString(Ljava/lang/String;Ljava/lang/String;)V

    const-string v0, "tags"

    iget-object v3, p0, Lcom/ninesky/browser/AddBookmarkActivity;->q:Ljava/lang/String;

    invoke-virtual {v2, v0, v3}, Landroid/os/Bundle;->putString(Ljava/lang/String;Ljava/lang/String;)V

    const-string v0, "invalidateThumbnail"

    iget-object v3, p0, Lcom/ninesky/browser/AddBookmarkActivity;->n:Ljava/lang/String;

    invoke-virtual {v1, v3}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v1

    if-eqz v1, :cond_8

    move v1, v6

    :goto_4
    invoke-virtual {v2, v0, v1}, Landroid/os/Bundle;->putBoolean(Ljava/lang/String;Z)V

    const-string v0, "touch_icon_url"

    iget-object v1, p0, Lcom/ninesky/browser/AddBookmarkActivity;->m:Ljava/lang/String;

    invoke-virtual {v2, v0, v1}, Landroid/os/Bundle;->putString(Ljava/lang/String;Ljava/lang/String;)V

    iget-object v0, p0, Lcom/ninesky/browser/AddBookmarkActivity;->x:Landroid/os/Handler;

    const/16 v1, 0x64

    invoke-static {v0, v1}, Landroid/os/Message;->obtain(Landroid/os/Handler;I)Landroid/os/Message;

    move-result-object v0

    invoke-virtual {v0, v2}, Landroid/os/Message;->setData(Landroid/os/Bundle;)V

    new-instance v1, Ljava/lang/Thread;

    new-instance v2, Lcom/ninesky/browser/bh;

    invoke-direct {v2, p0, v0}, Lcom/ninesky/browser/bh;-><init>(Lcom/ninesky/browser/AddBookmarkActivity;Landroid/os/Message;)V

    invoke-direct {v1, v2}, Ljava/lang/Thread;-><init>(Ljava/lang/Runnable;)V

    invoke-virtual {v1}, Ljava/lang/Thread;->start()V

    move v0, v7

    goto/16 :goto_2

    :cond_8
    move v1, v7

    goto :goto_4

    :cond_9
    move-object v1, v2

    goto :goto_3
.end method

.method static synthetic e(Lcom/ninesky/browser/AddBookmarkActivity;)Ljava/util/Vector;
    .locals 1

    iget-object v0, p0, Lcom/ninesky/browser/AddBookmarkActivity;->r:Ljava/util/Vector;

    return-object v0
.end method

.method static synthetic f(Lcom/ninesky/browser/AddBookmarkActivity;)I
    .locals 1

    iget v0, p0, Lcom/ninesky/browser/AddBookmarkActivity;->u:I

    return v0
.end method

.method static synthetic g(Lcom/ninesky/browser/AddBookmarkActivity;)Ljava/lang/String;
    .locals 1

    iget-object v0, p0, Lcom/ninesky/browser/AddBookmarkActivity;->m:Ljava/lang/String;

    return-object v0
.end method

.method static synthetic h(Lcom/ninesky/browser/AddBookmarkActivity;)Landroid/widget/EditText;
    .locals 1

    iget-object v0, p0, Lcom/ninesky/browser/AddBookmarkActivity;->d:Landroid/widget/EditText;

    return-object v0
.end method

.method static synthetic i(Lcom/ninesky/browser/AddBookmarkActivity;)Ljava/lang/String;
    .locals 1

    iget-object v0, p0, Lcom/ninesky/browser/AddBookmarkActivity;->p:Ljava/lang/String;

    return-object v0
.end method

.method static synthetic j(Lcom/ninesky/browser/AddBookmarkActivity;)Ljava/lang/String;
    .locals 1

    iget-object v0, p0, Lcom/ninesky/browser/AddBookmarkActivity;->n:Ljava/lang/String;

    return-object v0
.end method

.method static synthetic k(Lcom/ninesky/browser/AddBookmarkActivity;)Landroid/os/Handler;
    .locals 1

    iget-object v0, p0, Lcom/ninesky/browser/AddBookmarkActivity;->x:Landroid/os/Handler;

    return-object v0
.end method

.method static synthetic l(Lcom/ninesky/browser/AddBookmarkActivity;)V
    .locals 1

    const/4 v0, -0x1

    iput v0, p0, Lcom/ninesky/browser/AddBookmarkActivity;->u:I

    return-void
.end method


# virtual methods
.method public final a()V
    .locals 2

    const-string v0, "NSBrowser.AddBookmarkActivity"

    const-string v1, "onResponse"

    invoke-static {v0, v1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    iget-object v0, p0, Lcom/ninesky/browser/AddBookmarkActivity;->t:Lcom/ninesky/browser/a/a;

    invoke-virtual {v0}, Lcom/ninesky/browser/a/a;->b()Lcom/ninesky/browser/a/d;

    move-result-object v0

    invoke-virtual {v0}, Lcom/ninesky/browser/a/d;->a()[Ljava/lang/String;

    move-result-object v0

    iput-object v0, p0, Lcom/ninesky/browser/AddBookmarkActivity;->s:[Ljava/lang/String;

    new-instance v0, Landroid/os/Message;

    invoke-direct {v0}, Landroid/os/Message;-><init>()V

    const/16 v1, 0x65

    iput v1, v0, Landroid/os/Message;->what:I

    iget-object v1, p0, Lcom/ninesky/browser/AddBookmarkActivity;->x:Landroid/os/Handler;

    invoke-virtual {v1, v0}, Landroid/os/Handler;->sendMessage(Landroid/os/Message;)Z

    return-void
.end method

.method public final b()V
    .locals 2

    new-instance v0, Landroid/os/Message;

    invoke-direct {v0}, Landroid/os/Message;-><init>()V

    const/16 v1, 0x66

    iput v1, v0, Landroid/os/Message;->what:I

    iget-object v1, p0, Lcom/ninesky/browser/AddBookmarkActivity;->x:Landroid/os/Handler;

    invoke-virtual {v1, v0}, Landroid/os/Handler;->sendMessage(Landroid/os/Message;)Z

    return-void
.end method

.method public onClick(Landroid/view/View;)V
    .locals 2

    iget-object v0, p0, Lcom/ninesky/browser/AddBookmarkActivity;->f:Landroid/widget/Button;

    if-ne p1, v0, :cond_2

    invoke-direct {p0}, Lcom/ninesky/browser/AddBookmarkActivity;->c()V

    invoke-direct {p0}, Lcom/ninesky/browser/AddBookmarkActivity;->d()Z

    move-result v0

    if-eqz v0, :cond_0

    const/4 v0, 0x1

    invoke-virtual {p0, v0}, Lcom/ninesky/browser/AddBookmarkActivity;->setResult(I)V

    invoke-virtual {p0}, Lcom/ninesky/browser/AddBookmarkActivity;->finish()V

    :cond_0
    const-string v0, "AddBookmark"

    const-string v1, "Save"

    invoke-static {p0, v0, v1}, Lcom/mobclick/android/c;->a(Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;)V

    :cond_1
    :goto_0
    return-void

    :cond_2
    iget-object v0, p0, Lcom/ninesky/browser/AddBookmarkActivity;->g:Landroid/widget/Button;

    if-ne p1, v0, :cond_3

    invoke-direct {p0}, Lcom/ninesky/browser/AddBookmarkActivity;->c()V

    const/4 v0, 0x0

    invoke-virtual {p0, v0}, Lcom/ninesky/browser/AddBookmarkActivity;->setResult(I)V

    invoke-virtual {p0}, Lcom/ninesky/browser/AddBookmarkActivity;->finish()V

    const-string v0, "AddBookmark"

    const-string v1, "Cancel"

    invoke-static {p0, v0, v1}, Lcom/mobclick/android/c;->a(Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;)V

    goto :goto_0

    :cond_3
    iget-object v0, p0, Lcom/ninesky/browser/AddBookmarkActivity;->h:Landroid/widget/Button;

    if-ne p1, v0, :cond_1

    invoke-direct {p0}, Lcom/ninesky/browser/AddBookmarkActivity;->c()V

    new-instance v0, Lcom/ninesky/browser/l;

    invoke-direct {v0, p0}, Lcom/ninesky/browser/l;-><init>(Lcom/ninesky/browser/AddBookmarkActivity;)V

    invoke-virtual {v0}, Lcom/ninesky/browser/l;->start()V

    const/4 v0, 0x2

    invoke-virtual {p0, v0}, Lcom/ninesky/browser/AddBookmarkActivity;->setResult(I)V

    invoke-virtual {p0}, Lcom/ninesky/browser/AddBookmarkActivity;->finish()V

    const-string v0, "AddBookmark"

    const-string v1, "Remove"

    invoke-static {p0, v0, v1}, Lcom/mobclick/android/c;->a(Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;)V

    goto :goto_0
.end method

.method protected onCreate(Landroid/os/Bundle;)V
    .locals 7

    const/4 v3, 0x3

    const/4 v2, 0x0

    const/4 v6, 0x1

    const/4 v5, 0x0

    invoke-super {p0, p1}, Landroid/app/Activity;->onCreate(Landroid/os/Bundle;)V

    invoke-virtual {p0, v3}, Lcom/ninesky/browser/AddBookmarkActivity;->requestWindowFeature(I)Z

    const/high16 v0, 0x7f03

    invoke-virtual {p0, v0}, Lcom/ninesky/browser/AddBookmarkActivity;->setContentView(I)V

    const v0, 0x7f0700a4

    invoke-virtual {p0, v0}, Lcom/ninesky/browser/AddBookmarkActivity;->setTitle(I)V

    invoke-virtual {p0}, Lcom/ninesky/browser/AddBookmarkActivity;->getWindow()Landroid/view/Window;

    move-result-object v0

    const v1, 0x108000b

    invoke-virtual {v0, v3, v1}, Landroid/view/Window;->setFeatureDrawableResource(II)V

    invoke-virtual {p0}, Lcom/ninesky/browser/AddBookmarkActivity;->getIntent()Landroid/content/Intent;

    move-result-object v0

    invoke-virtual {v0}, Landroid/content/Intent;->getExtras()Landroid/os/Bundle;

    move-result-object v0

    iput-object v0, p0, Lcom/ninesky/browser/AddBookmarkActivity;->l:Landroid/os/Bundle;

    iget-object v0, p0, Lcom/ninesky/browser/AddBookmarkActivity;->l:Landroid/os/Bundle;

    if-eqz v0, :cond_7

    iget-object v0, p0, Lcom/ninesky/browser/AddBookmarkActivity;->l:Landroid/os/Bundle;

    const-string v1, "bookmark"

    invoke-virtual {v0, v1}, Landroid/os/Bundle;->getBundle(Ljava/lang/String;)Landroid/os/Bundle;

    move-result-object v0

    if-eqz v0, :cond_0

    iput-object v0, p0, Lcom/ninesky/browser/AddBookmarkActivity;->l:Landroid/os/Bundle;

    iput-boolean v6, p0, Lcom/ninesky/browser/AddBookmarkActivity;->k:Z

    :cond_0
    iget-object v0, p0, Lcom/ninesky/browser/AddBookmarkActivity;->l:Landroid/os/Bundle;

    const-string v1, "url"

    invoke-virtual {v0, v1}, Landroid/os/Bundle;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    iput-object v0, p0, Lcom/ninesky/browser/AddBookmarkActivity;->n:Ljava/lang/String;

    iput-object v0, p0, Lcom/ninesky/browser/AddBookmarkActivity;->p:Ljava/lang/String;

    iget-boolean v1, p0, Lcom/ninesky/browser/AddBookmarkActivity;->k:Z

    if-nez v1, :cond_1

    invoke-virtual {p0}, Lcom/ninesky/browser/AddBookmarkActivity;->getContentResolver()Landroid/content/ContentResolver;

    move-result-object v1

    invoke-static {v1, v0}, Lcom/ninesky/browser/provider/b;->a(Landroid/content/ContentResolver;Ljava/lang/String;)Z

    move-result v1

    if-eqz v1, :cond_1

    iput-boolean v6, p0, Lcom/ninesky/browser/AddBookmarkActivity;->k:Z

    :cond_1
    iget-boolean v1, p0, Lcom/ninesky/browser/AddBookmarkActivity;->k:Z

    if-eqz v1, :cond_2

    const v1, 0x7f0700a5

    invoke-virtual {p0, v1}, Lcom/ninesky/browser/AddBookmarkActivity;->setTitle(I)V

    :cond_2
    iget-object v1, p0, Lcom/ninesky/browser/AddBookmarkActivity;->l:Landroid/os/Bundle;

    const-string v2, "addDefinedBookmark"

    invoke-virtual {v1, v2}, Landroid/os/Bundle;->getBoolean(Ljava/lang/String;)Z

    move-result v1

    iput-boolean v1, p0, Lcom/ninesky/browser/AddBookmarkActivity;->v:Z

    iget-object v1, p0, Lcom/ninesky/browser/AddBookmarkActivity;->l:Landroid/os/Bundle;

    const-string v2, "addEditBookmark"

    invoke-virtual {v1, v2}, Landroid/os/Bundle;->getBoolean(Ljava/lang/String;)Z

    move-result v1

    iput-boolean v1, p0, Lcom/ninesky/browser/AddBookmarkActivity;->w:Z

    iget-object v1, p0, Lcom/ninesky/browser/AddBookmarkActivity;->l:Landroid/os/Bundle;

    const-string v2, "displayorder"

    const/4 v3, -0x2

    invoke-virtual {v1, v2, v3}, Landroid/os/Bundle;->getInt(Ljava/lang/String;I)I

    move-result v1

    iput v1, p0, Lcom/ninesky/browser/AddBookmarkActivity;->u:I

    iget-object v1, p0, Lcom/ninesky/browser/AddBookmarkActivity;->l:Landroid/os/Bundle;

    const-string v2, "title"

    invoke-virtual {v1, v2}, Landroid/os/Bundle;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v1

    iput-object v1, p0, Lcom/ninesky/browser/AddBookmarkActivity;->o:Ljava/lang/String;

    iget-object v2, p0, Lcom/ninesky/browser/AddBookmarkActivity;->l:Landroid/os/Bundle;

    const-string v3, "tags"

    invoke-virtual {v2, v3}, Landroid/os/Bundle;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v2

    iget-object v3, p0, Lcom/ninesky/browser/AddBookmarkActivity;->l:Landroid/os/Bundle;

    const-string v4, "touch_icon_url"

    invoke-virtual {v3, v4}, Landroid/os/Bundle;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v3

    iput-object v3, p0, Lcom/ninesky/browser/AddBookmarkActivity;->m:Ljava/lang/String;

    move-object v3, v1

    move-object v1, v2

    move-object v2, v0

    :goto_0
    const v0, 0x7f0c0001

    invoke-virtual {p0, v0}, Lcom/ninesky/browser/AddBookmarkActivity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/EditText;

    iput-object v0, p0, Lcom/ninesky/browser/AddBookmarkActivity;->c:Landroid/widget/EditText;

    iget-object v0, p0, Lcom/ninesky/browser/AddBookmarkActivity;->c:Landroid/widget/EditText;

    invoke-virtual {v0, v3}, Landroid/widget/EditText;->setText(Ljava/lang/CharSequence;)V

    const v0, 0x7f0c0003

    invoke-virtual {p0, v0}, Lcom/ninesky/browser/AddBookmarkActivity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/EditText;

    iput-object v0, p0, Lcom/ninesky/browser/AddBookmarkActivity;->d:Landroid/widget/EditText;

    iget-object v0, p0, Lcom/ninesky/browser/AddBookmarkActivity;->d:Landroid/widget/EditText;

    invoke-virtual {v0, v2}, Landroid/widget/EditText;->setText(Ljava/lang/CharSequence;)V

    iget-boolean v0, p0, Lcom/ninesky/browser/AddBookmarkActivity;->v:Z

    if-eqz v0, :cond_3

    iput-boolean v5, p0, Lcom/ninesky/browser/AddBookmarkActivity;->k:Z

    :cond_3
    iget-boolean v0, p0, Lcom/ninesky/browser/AddBookmarkActivity;->w:Z

    if-nez v0, :cond_6

    iget-object v0, p0, Lcom/ninesky/browser/AddBookmarkActivity;->d:Landroid/widget/EditText;

    invoke-virtual {v0, v5}, Landroid/widget/EditText;->setEnabled(Z)V

    :goto_1
    iget-object v0, p0, Lcom/ninesky/browser/AddBookmarkActivity;->d:Landroid/widget/EditText;

    new-instance v2, Lcom/ninesky/browser/o;

    invoke-direct {v2, p0}, Lcom/ninesky/browser/o;-><init>(Lcom/ninesky/browser/AddBookmarkActivity;)V

    invoke-virtual {v0, v2}, Landroid/widget/EditText;->setOnFocusChangeListener(Landroid/view/View$OnFocusChangeListener;)V

    const v0, 0x7f0c0005

    invoke-virtual {p0, v0}, Lcom/ninesky/browser/AddBookmarkActivity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/EditText;

    iput-object v0, p0, Lcom/ninesky/browser/AddBookmarkActivity;->e:Landroid/widget/EditText;

    iget-object v0, p0, Lcom/ninesky/browser/AddBookmarkActivity;->e:Landroid/widget/EditText;

    iget-object v2, p0, Lcom/ninesky/browser/AddBookmarkActivity;->y:Landroid/text/TextWatcher;

    invoke-virtual {v0, v2}, Landroid/widget/EditText;->addTextChangedListener(Landroid/text/TextWatcher;)V

    if-eqz v1, :cond_4

    iget-object v0, p0, Lcom/ninesky/browser/AddBookmarkActivity;->e:Landroid/widget/EditText;

    invoke-virtual {v0, v1}, Landroid/widget/EditText;->setText(Ljava/lang/CharSequence;)V

    iput-object v1, p0, Lcom/ninesky/browser/AddBookmarkActivity;->q:Ljava/lang/String;

    const-string v0, ","

    invoke-static {v1, v0}, Lcom/ninesky/a/b;->a(Ljava/lang/String;Ljava/lang/String;)Ljava/util/Vector;

    move-result-object v0

    iput-object v0, p0, Lcom/ninesky/browser/AddBookmarkActivity;->r:Ljava/util/Vector;

    :cond_4
    const v0, 0x7f0c0009

    invoke-virtual {p0, v0}, Lcom/ninesky/browser/AddBookmarkActivity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/Button;

    iput-object v0, p0, Lcom/ninesky/browser/AddBookmarkActivity;->f:Landroid/widget/Button;

    iget-object v0, p0, Lcom/ninesky/browser/AddBookmarkActivity;->f:Landroid/widget/Button;

    invoke-virtual {v0, p0}, Landroid/widget/Button;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    const v0, 0x7f0c000a

    invoke-virtual {p0, v0}, Lcom/ninesky/browser/AddBookmarkActivity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/Button;

    iput-object v0, p0, Lcom/ninesky/browser/AddBookmarkActivity;->g:Landroid/widget/Button;

    iget-object v0, p0, Lcom/ninesky/browser/AddBookmarkActivity;->g:Landroid/widget/Button;

    invoke-virtual {v0, p0}, Landroid/widget/Button;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    const v0, 0x7f0c000b

    invoke-virtual {p0, v0}, Lcom/ninesky/browser/AddBookmarkActivity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/Button;

    iput-object v0, p0, Lcom/ninesky/browser/AddBookmarkActivity;->h:Landroid/widget/Button;

    iget-boolean v0, p0, Lcom/ninesky/browser/AddBookmarkActivity;->k:Z

    if-eqz v0, :cond_5

    iget-object v0, p0, Lcom/ninesky/browser/AddBookmarkActivity;->h:Landroid/widget/Button;

    invoke-virtual {v0, v5}, Landroid/widget/Button;->setVisibility(I)V

    iget-object v0, p0, Lcom/ninesky/browser/AddBookmarkActivity;->h:Landroid/widget/Button;

    invoke-virtual {v0, p0}, Landroid/widget/Button;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    :cond_5
    const v0, 0x7f0c0006

    invoke-virtual {p0, v0}, Lcom/ninesky/browser/AddBookmarkActivity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    iput-object v0, p0, Lcom/ninesky/browser/AddBookmarkActivity;->i:Landroid/view/View;

    const v0, 0x7f0c0008

    invoke-virtual {p0, v0}, Lcom/ninesky/browser/AddBookmarkActivity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/TableLayout;

    iput-object v0, p0, Lcom/ninesky/browser/AddBookmarkActivity;->j:Landroid/widget/TableLayout;

    return-void

    :cond_6
    iget-object v0, p0, Lcom/ninesky/browser/AddBookmarkActivity;->d:Landroid/widget/EditText;

    invoke-virtual {v0, v6}, Landroid/widget/EditText;->setEnabled(Z)V

    goto :goto_1

    :cond_7
    move-object v1, v2

    move-object v3, v2

    goto/16 :goto_0
.end method

.method protected onPause()V
    .locals 0

    invoke-super {p0}, Landroid/app/Activity;->onPause()V

    invoke-static {p0}, Lcom/mobclick/android/c;->a(Landroid/content/Context;)V

    return-void
.end method

.method protected onResume()V
    .locals 0

    invoke-super {p0}, Landroid/app/Activity;->onResume()V

    invoke-static {p0}, Lcom/mobclick/android/c;->b(Landroid/content/Context;)V

    return-void
.end method
